package com.qiandw.entity.security;

import lombok.Data;
import lombok.ToString;

import javax.persistence.*;
import java.util.List;

/**
 * @author coxx
 */
@Data
@ToString
@Entity
@Table(name = "sys_user")
public class User{
    @Id
    private String id;
    private String username;
    private String password;
    private String mail;
    private String mobile;
    private String idNo;
    private String education;
    private Boolean isEnabled;
    @ManyToMany
    @JoinTable(name = "user_role",
        joinColumns = {@JoinColumn(name = "sysUser_id")},
            inverseJoinColumns = {@JoinColumn(name = "sysRole_id")}
    )
    private List<Role> roles;

}
